VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "TestClassFixtureNotify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Option Explicit

Private mClass As ClassFixture
Private mClassStart As ClassFixture
Private mEndCalled As Boolean

Private mDescription As New ClassDescriptor

Public Sub testClassNotify()
givenClass
whenClassIsRun
thenStartGivesClass
thenEndCalled
End Sub

''
''
Private Sub givenClass()
Set mClass = New ClassFixture
mDescription.init "VBUnit2", "ObjectHolder"
mClass.init mDescription
End Sub

Private Sub whenClassIsRun()
mClass.forward Me
End Sub

Private Sub thenStartGivesClass()
assert.equals mClassStart, mClass, "same class"
End Sub
Private Sub thenEndCalled()
assert.isTrue mEndCalled, "End called"
End Sub

''

'Callbacks
Public Sub StartClass(Class As ClassFixture)
Set mClassStart = Class
End Sub
Public Sub EndClass()
mEndCalled = True
End Sub



'OPTIONAL METHODS
Public Function NumOfAsserts() As Long
NumOfAsserts = 2
End Function

